import { config } from 'config';

export const optionForNobody = () => {
    const urk = config.url.webApp;
    return {
        reply_markup: {
            inline_keyboard: [
                [
                    {
                        text: 'Enter Binance Api and secret key',
                        web_app: { url: urk + '/home' },
                    },
                ],
                [
                    {
                        text: 'How to get keys?',
                        web_app: { url: urk + '/instruction' },
                    },
                ],
            ],
        },
    };
};

export const optionForUser = () => {
    const urk = config.url.webApp;
    return {
        reply_markup: {
            inline_keyboard: [
                [
                    {
                        text: 'Home',
                        web_app: { url: urk + '/home' },
                    },
                ],
                [
                    {
                        text: 'Top up account balance',
                        web_app: { url: urk + '/balance' },
                    },
                ],
                [
                    {
                        text: 'Settings',
                        web_app: { url: urk + '/settings' },
                    },
                ],
                [
                    {
                        text: 'Instruction',
                        web_app: { url: urk + '/instruction' },
                    },
                ],
            ],
        },
    };
};

export const optionMenu = (menu: { text: string }[][] | { text: string; web_app?: { url: string } }[][]) => {
    return {
        reply_markup: {
            keyboard: menu,
            resize_keyboard: true,
            one_time_keyboard: true,
        },
    };
};
